package com.streamsets.datacollector.model.etl.bean;

import java.util.List;

/**
 *   字段加密或者脱敏，Stage Dto
 *   示例
 [ {
 "sourceFieldsToHash" : [ "/sort_no" ],
 "hashType" : "MD5"
 }, {
 "sourceFieldsToHash" : [ "/id" ],
 "hashType" : "MASK",
 "maskType" : "retain_before_2_after_4"
 } ]
 * @author wengzhonghui
 * @date 2020/9/16 11:26
 */
public class FieldValueHashBean {


    /* 脱敏或加密某一列的列名
     * 示例："fields" : [ "/remark", "/school_org_id" ],
     */
    private List<String> fields;

    // 脱敏或加密的类型，包括:MASK,MD5,SHA1,SHA256
    private String hashType = "";

   // hashType为MASK时，才需要
	// 脱敏屏蔽规则，包括以下类型：
	// 保留前x后y: retain_before_x_after_y    保留自x至y: retain_from_x_to_y
	// 掩码前x后y: mask_before_x_after_y    掩码自x至y: mask_from_x_to_y
	// 其中x和y是具体的数值
	private String maskType = "";

	public List<String> getFields() {
		return fields;
	}

	public void setFields(List<String> fields) {
		this.fields = fields;
	}

	public String getHashType() {
		return hashType;
	}

	public void setHashType(String hashType) {
		this.hashType = hashType;
	}

	public String getMaskType() {
		return maskType;
	}

	public void setMaskType(String maskType) {
		this.maskType = maskType;
	}
}
